package cn.com.niit.service.impl;



import cn.com.niit.mapper.UserMapper;
import cn.com.niit.pojo.User;
import cn.com.niit.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper mapper;

    @Override
    public void insertUser(User user) {
        mapper.insertUser(user);
    }

    @Override
    public User queryCount(String name) {
        return mapper.queryCount(name);
    }

    @Override
    public List<User> showAll(User user) {
        return mapper.showAll(user);
    }

    @Override
    public void pass(String uname) {
        mapper.pass(uname);
    }

    @Override
    public void add(Double total, String uname) {
        mapper.add(total,uname);
    }

    @Override
    public void shop(Double total, String uname) {
        mapper.shop(total,uname);

    }

    @Override
    public void addM(Double total, String uname) {
        mapper.addM(total,uname);
    }

}
